package com.hakim.wfb.customer.enums;

/**
 * 
 * djd ErrorCodeEnum
 * @author qibin
 * @version $Id: ErrorCodeEnum.java, v 0.1 2016年4月22日 上午11:17:19 qibin Exp $
 */
public enum DjdErrorCodeEnum {
	ACCOUNT_ISNULL(1001,"此帐号不存在"),
	ACCOUNT_EXITS(1001,"此帐号已存在"),
	ACCOUNT_LOGOUT(1002,"此帐号已注销"),
	ACCOUNT_FROZEN(1003,"此帐号已冻结"),
	ACCOUNT_LOGIN_INPUT_ERROR(1004,"请输入正确密码"),
    PHONE_REPEAT(1005,"您的手机号重复啦，请联系微信客服,微信公众号：鼎及贷"),
    BIND_WEIXIN_EXIST(1006,"绑定微信失败，已绑定其他账号"),

    PIC_DATA_ERROR(1007,"上传图片数据错误"),

    PHONE_OR_OPENID_EXITS(1008,"手机号码或微信账号已经存在"),
    OPENID_BINDING_EXITS(1009,"当前微信账号已经绑定了其他手机号码"),
    OPHONE_BINDING_EXITS(1010,"当前手机号码已经绑定了其他微信账号"),

    VALIDE_CODE(1011,"验证码错误"),
    UUID_NOT_EXIST(1012,"UUID不存在"),

    CUSTOMER_CONSUME_NOT_CLEAR(1013,"该用户有未结束的提现记录，无法锁定"),
    PIC_RETURN_DATA_ERROR(1014,"上传图片返回数据错误"),

    CUSTOMER_NAME_NOT_MATCH(1015,"用户姓名不匹配，校验失败"),
    CUSTOMER_ID_NOT_MATCH(1016,"身份证号码不匹配，校验失败"),
    CUSTOMER_FRONT_ALREADY_IDENTIFIED(1017,"已完成正面身份证认证，无需再次认证"),
    CUSTOMER_BACK_ALREADY_IDENTIFIED(1018,"已完成反面身份证认证，无需再次认证"),

    CUSTOMER_IDCARD_EXPIRES_RECENTLY(1019,"身份证即将过期或已过期"),
    CUSTOMER_INFORMATION_NOT_MATCH(1020,"身份证正面照与您的信息不符"),
    CHANNEL_CODE_NOT_EXIST(1021,"渠道号不存在"),

    QUERY_ERROR(2001,"查询错误"),

    EMAIL_EXIST(3001,"该邮箱已被使用，换个邮箱再来吧"),

    IDCARD_EXIST(3002,"该身份证已被使用，如有疑问请致电客服电话400-8313-168"),

    EMAIL_ERROR(3003,"邮箱不是酱紫的，要准确填写哦"),

    IDCARD_ERROR (3004, "请输入正确的身份证号"),
    ACCOUNT_NOT_FIND(1001,"账户不存在"),

    CONTACR_ALREADY_SET(4001,"用户联系人信息已经设置,不能修改!"),

    JUMP_UNLOGIN_ERROR(3010,"用户未登录！"),

    JUMP_ILLEGAL_TERMINAL_TYPE(3011,"非法终端类型,不允许进行该操作!");

    /**
     * 值
     */
    private int code;
    /**
     * 注释
     */
    private String message;

    private DjdErrorCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static DjdErrorCodeEnum getByCode(int code) {
        for (DjdErrorCodeEnum type : values()) {
            if (type.getCode() == (code)) {
                return type;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
